Script Detection Service

ABSTRACT

Script detection service techniques are described. In an implementation, a determination is made as to which human writing system is associated with individual text characters in a string of one or more text characters based on values representing the individual text characters in the string. A particular human writing system is designated as associated with the string based on the values associated with the individual text characters in the string.

BACKGROUND

Text data may be expressed in a multitude of human understandablelanguages (human languages) that implement different human writingsystems to communicating content. For example, while the Chineselanguage uses numerous text characters to express content, humanlanguages using Latin text characters may reuse common text charactersthat are combined phonetically and arranged in different ways to expresscontent. An application that makes use of text data expressed in a humanlanguage may support multiple human languages that utilize differenthuman writing systems to express the underlying content. However, theapplication may be inefficient when accounting for the multitude ofhuman languages.

SUMMARY

Script detection service techniques are described. In an implementation,a determination is made as to which human writing system is associatedwith individual text characters in a string of one or more textcharacters based on values representing the individual text charactersin the string. A particular human writing system is designated asassociated with the string based on the values associated with theindividual text characters in the string.

In an implementation, a system includes a script detection service todesignate which particular human writing system is associated with astring of one or more text characters in a text. The script detectionservice may make the designation by determining which human writingsystem is associated with individual text characters in the one or moretext characters.

In an implementation, one or more computer-readable media compriseinstructions that are executable by a computer to designate a particularhuman writing system that is associated with a string of one or moretext characters from a scan of values representing text characters inthe string and indicate a range of positions within a text including thestring for the one or more text characters.

This Summary is provided to introduce a selection of concepts in asimplified form that are further described below in the DetailedDescription. This Summary is not intended to identify key or essentialfeatures of the claimed subject matter, nor is it intended to be used asan aid in determining the scope of the claimed subject matter. The terms“service” and/or “module,” for instance, may refer to system(s),computer-readable instructions (e.g., one or more computer-readablestorage media having executable instructions) and/or procedure(s) aspermitted by the context above and throughout the document.

BRIEF DESCRIPTION OF THE DRAWINGS

The detailed description is described with reference to the accompanyingfigures. In the figures, the left-most digit(s) of a reference numberidentifies the figure in which the reference number first appears. Theuse of similar reference numbers in different instances in thedescription and the figures may indicate similar or identical items.

FIG. 1 is an illustration of an environment in an example implementationthat is operable to employ brokered communication techniques.

FIG. 2 is an illustration of a system in an example implementation inwhich a linguistic service is designated as available to an applicationthrough a platform.

FIG. 3 is an illustration of an example implementation showing brokeredcommunication that may be employed by a system of FIGS. 1 and 2.

FIG. 4 is an illustration of an example implementation showing scriptdetection techniques and language detection techniques that may beemployed by a system of FIG. 1.

FIG. 5 is an illustration of a language detection service of FIG. 4.

FIG. 6 is a flow diagram depicting a procedure in an exampleimplementation in which an application and a linguistic servicecommunicate through a platform.

FIG. 7 is a flow diagram depicting a procedure in an exampleimplementation in which script detection is employed.

FIG. 8 is a flow diagram depicting a procedure in an exampleimplementation in which language detection is employed.

DETAILED DESCRIPTION

Overview

Traditionally, an application making use of text data includes one ormore services to perform functions with the text data. For example, aword processing application may include a spelling service that checksthe text data to ensure that the text data conforms to a human language.Applications making use of text data may be complex as a multitude ofhuman languages exist and human languages implement a wide variety ofhuman writing systems and conventions to express content. Consequently,operation of an application interacting with human text may beinefficient as the application accounts for the multitude of humanlanguages and human writing systems.

Script detection service techniques are described. In an implementationa determination is made as to which human writing system is associatedwith individual text characters in a string of one or more textcharacters. For example, the determination may include scanning valuesrepresenting individual text characters in a string. A designation maybe made to associate a particular human writing system with the stringbased on the determination as to which human writing system isassociated with values representing the individual text characters inthe string.

In an implementation, a range of positions in a text for the one or morecharacters are indicated. For example, a communication may be formedthat associates the particular human writing system with the range ofpositions in the text occupied by the one or more characters included inthe string.

When more than one human writing system is associated with theindividual text characters included in the string, the particular humanwriting system may be a language that incorporates text characters froma base human language. For example, when a string includes a first textcharacter that is Chinese and a second text character that is Japanese,the string may be designated as Japanese as the Japanese languageincorporates Chinese text characters.

In one or more embodiments, script detection techniques may be employedas an independent service or may be implemented as part of languagedetection service techniques. Further discussion of script detectiontechniques may be found in relation to FIGS. 4, 7 and 8.

Language detection service techniques are also described. In animplementation, a determination is made as to which human writing systemis associated with text characters, represented by values, in a string.For example, values representing text characters in a string may bescanned to determine which human writing system is associated with thetext characters forming the string. When the values are associated withmore than one human writing system, the string is compared to a targeteddictionary to identify a particular human language associated with thestring. In further implementations, a human language associated with atext including the string is assigned based on the string. For example,the string may be compared with the targeted dictionary to identifywhether the text including string is to be assigned, for example, theEnglish language. Further discussion of language detection techniquesmay be found in relation to FIGS. 4, 5, 7 and 8.

In another implementation, the human language associated with the stringis ascertained based on a substring in the string. For example, the word“riding” may be parsed to the suffix “-ing” so that the English languageis associated with the word “riding”.

In a further implementation, selection of which strings included in thetargeted dictionary are to be used for comparison may be based on thedetermination. For example, when the string includes Latin textcharacters, Latin based strings in the targeted dictionary may beconsidered, e.g., English, French, German, or Italian.

In the following discussion, an “Example Environment” is first described(FIGS. 1-3) that may employ script detection and/or language detectionservice techniques. The “Example Environment” is discussed with respectto interacting with an application through a platform. While exampletechniques, systems and approaches are generally described in FIGS. 1-3,in other implementations, the script detection service and/or languagedetection service may be implemented in other environments andconfigurations. Discussions related to other linguistic services areincluded to highlight interactions between a script detection service, alanguage detection service, the platform, one or more applications,other linguistic services and so on. “Example Procedures” are alsodescribed that may be employed in the example environments, as well asin other environments. Although these, systems and techniques aredescribed as employed in a computing environment in the followingdiscussion, it should be readily apparent that these structures,modules, techniques and approaches may be incorporated in a variety ofenvironments without departing from the spirit and scope thereof. Inaddition, while text and text data are discussed the methods,techniques, approaches, service, modules and so on may be configured toimplement other encoded information. For example, a service may beconfigured to recognize property information for a video file.

Example Environment

FIG. 1 is an illustration of an environment 100 in accordance with oneor more embodiments. The environment 100 includes a computer 102 havingone or more applications 104 (one is illustrated) and one or morelinguistic services 108 communicating with the application 104 through aplatform 106. The linguistic services 108 are representative offunctionality to recognize linguistic property information associatedwith text data in a text. The linguistic services 108 may be availableto perform one or more functions for the application 104. For example,as illustrated, the linguistic services 108 may include a proofingservice 110, a communication service 112, a mapping service 114, alanguage detection service 116, a script detection service 118 and soon. In one or more embodiments, the linguistic services 108 may beplugins to the platform 106. For example, the platform 106 may host thelinguistic services 108.

The linguistic services 108 may include modules (e.g., subservices) toperform specific functions for a linguistic service. For example, theproofing service 110 may include a spelling module 120 and a grammarmodule 122 and so on.

While the computer 102 is illustrated as including a processor 124 andmemory 126, the processor 124 and/or the memory 126 may berepresentative of one or more devices, e.g., the processor 124 may berepresentative of a plurality of central processing units. Processor(s)are not limited by the materials from which they are formed or theprocessing mechanisms employed therein. For example, processor(s) may becomprised of semiconductor(s) and/or transistors (e.g., electronicintegrated circuits (ICs)) that execute instructions to provide theapplication 104 and/or linguistic services 108. Sample processormechanisms may include, but are not limited to, quantum computing,optical computing, mechanical computing (e.g., using nanotechnology) andso on.

Although one memory is illustrated, a wide variety of types andcombinations of memory may be employed, such as random access memory(RAM), read only memory (ROM), hard disk memory, removable medium memoryand other types of computer-readable media. The memory 126, for example,may be used to store instructions used by the processor(s) to providethe application 104 and/or linguistic services 108.

The computer 102 is illustrated as executing an operating system 128 onthe processor(s), which is also storable in the memory 126. Theoperating system 128 may be representative of functionality to“abstract” underlying functionality of the computer 102. The operatingsystem 128 may, for example, provide a foundation for the application104 and/or linguistic services 108 to be executed on the computer 102without having to “know” the specific configuration of the computer 102,e.g., which particular “kind” processor is employed by the computer 102,amounts of memory and so on.

The platform 106 may broker communication between the application 104and the linguistic services 108. For example, the platform 106 may beconfigured to broker communications passing through the platform 106such that the linguistic services 108 are obscured from the application104. By obscuring the linguistic services 108 from the application 104,the linguistic services 108 may be changed or added without encoding thechange or the addition into the application's code. In this manner, thelinguistic services 108 may be independent from the application 104. Forexample, instead of configuring a first linguistic service to functionfor a specific application, the first linguistic service may be formedso that multiple applications may implement the first linguisticservice, e.g., individual instances of the first linguistic service.Additional aspects of the platform 106 and associated benefits arediscussed with respect to sample communication sessions between theapplication 104 and the linguistic services 108.

In one or more embodiments, a service manager 130 may be included in thecomputer 102. The service manager 130 may be representative offunctionality to expose a way for users to manage the platform 106and/or the linguistic services 108. For example, when a user installs anew linguistic service, the service manager 130 may be used to manage aplugin process to override a previously installed service. Thus, forexample, when a new proofing service is installed, the service manager130 may be used to manage the platform 106 and/or the linguisticservices 108 so that text data for proofing is communicated to the newproofing service rather than a previous proofing service.

Referring to FIG. 2, when initiating communication, the platform 106 maydesignate which linguistic services 108 (in system 200) are availablefor use by the application 104 (e.g., a communication application) basedon a property of the linguistic service, e.g., a service property. Forexample, during an enumeration phase, the platform 106 may designatethat the spelling property and a phone lookup property are availablethrough the platform 106, rather than designating that the proofingservice 110 and the communication service 112 are available for use bythe application 104. By designating linguistic services 108 based onservice properties, the platform 106 may obscure (e.g., conceal) thelinguistic service providing the function to the application 104 (andvice versa). As a result, the application 104 may not be configured fora particular service in order to implement the functionality provided bythe particular linguistic service. Although “a service property” isdiscussed, in one or more instances multiple service properties may beimplemented.

For example, in response to receiving an application program interface(API) call, the platform 106 may designate the linguistic servicesavailable for use by the application 104. The platform 106 may designatethat a particular linguistic service is available based on a serviceproperty of the particular linguistic service. In this way, theapplication 104 may not be tied to the particular linguistic service(e.g., the linguistic services 108 may be decoupled from the application104) and the platform 106 may designate the available linguisticservices without the application 104 issuing an API call specifying theparticular linguistic service, e.g., an API call for the communicationservice 112. Moreover, the application 104 may use a limited number ofAPI calls in comparison to issuing API calls tied to linguisticservices.

In one or more embodiments, the application 104 may specify thatlinguistic services 108 are to be designated based on a service propertyspecified in the API call. The application 104 may prescreen (e.g.,filter) which linguistic services 108 are to be designated by specifyingwhich service properties are relevant to the application 104. Forexample, a word processing application may specify that a spellingfunctionality is to be designated by issuing an API call specifying aspelling property. Accordingly, the platform 106 may not designate thecommunication service 112 because a phone lookup property was notspecified in the API call. Having described designating linguisticservices, communication and recognizing linguistic property informationare now discussed.

Referring to FIG. 3, once the linguistic services are designated, theapplication 104 (in a system 300) may send a text 334 to a designatedlinguistic service for recognition. For example, the platform 106 maybroker communication of the text 334 to the designated linguisticservices. The platform 106, for example, may route or direct the text334 to the proofing service 110.

The designated linguistic services may recognize linguistic propertyinformation associated with text data in the text 334. For example, oneof the linguistic services 108 may associate linguistic propertyinformation with text data within range of the text 334, e.g., 8 bytesof data that start at a position 20 bytes into the text 334.

Consider for example, a session occurring between the application 104(e.g., communication application) having the text 334, the proofingservice 110 and the communication service 112. As illustrated, the text334 may include a telephone number “5558675309” and the word “cel.” Theplatform 106 may, for example, broker communication of the text 334 bydirecting the text 334 to the proofing service 110.

Upon receiving the text 334, the proofing service 110 may recognizelinguistic property information associated with text data within a rangeof the text 334 and return linguistic property information to theapplication 104. For example, the proofing service 110 may recognizethat the word “cel” is misspelled (e.g., “cel” is not in a dictionary)and that the word “cel” is an improper spelling of the word “cell.” As aresult, the proofing service 110 may populate the memory 126 (e.g.,“property bag”) with the linguistic property information indicating thatthe text data is misspelled and the text data is the word “cell.” Theproofing service 110 may associate the foregoing linguistic propertyinformation with a range occupied by the word “cel” in the emailmessage. For example, the word “cel” may start at position 51 and go forthree units in the text 334.

In the case of the communication service 112, upon receiving the text334 (e.g., an email message), the communication service 112 mayrecognize that text data “5558675309” is a telephone number, e.g., thetext data within the range occupied by “5558675309” corresponds to atelephone number. The range for the telephone number may, for example,start at position 55 in the text and have a length of 10 units. Inresponse to recognizing the text data as a telephone number, a phonelookup module 232 may populate the memory 126 with caller identificationinformation associated with the telephone number, e.g., “Jenny” andassociate a range starting at position 55 with the term “Jenny”.

With the linguistic property information in the memory 126, the platform106 may communicate the text data property information. For example, theproofing service 110 may store the linguistic property information“cell” in memory 126 until the communication service 112 has recognizedthe telephone number—at which time, the word “cell” and the calleridentification information, “Jenny,” may be communicated to theapplication 104.

When the text data within the range has been altered (e.g., the text hasbeen deleted or modified) since the associated linguistic propertyinformation was stored in memory 126, the platform 106 may release thememory 126 storing the linguistic property information. For example, theplatform 106 may permit deletion or overwriting of a portion of thememory 126 storing the linguistic property information when theassociated text data has been altered.

In one or more embodiments, the linguistic services 108 may beconfigured to interact with other linguistic services through theplatform 106. For example, the language detection service 118 may beused to designate the text data as, for example, German beforerequesting that a German proofing service spell-check the text data. Inthe foregoing situation, the language detection service 116 may returnthe recognized linguistic property information (e.g., the text data isGerman) through the platform 106 to the German proofing service. Inanother example, the proofing service 110 may request that the languagedetection service 116 identify which human language is associated withthe text data and return the linguistic property information result tothe proofing service 110.

In some implementations, the linguistic services 108 may be configuredto form a callback to the application 104 upon recognizing thelinguistic property information. For example, the proofing service 110may form and send the application 104 a callback that indicates that thememory 126 has been populated with linguistic property information. Inresponse, the application 104 may instruct the platform 106 tocommunicate the linguistic property information.

In another implementation, the linguistic services 108 output thelinguistic property information in a format indicated by the application104. For example, as part of initiating a session, the application 104may indicate that the proofing service 110 is to return the linguisticproperty information in hypertext markup language (HTML) format. Inother implementations, the linguistic service 108 may return multipleversions of the linguistic property information, e.g., as Unicode textand HTML. In further embodiments, the linguistic services 108 may outputlinguistic property information in a format specific to one or moreapplications to accommodate interrelated applications.

In one or more embodiments, the linguistic services 108 may indicatethat an action is associated with the text data within a range of thetext. For example, the communication service 112 may indicate that textdata “5558675309” is a telephone number and/or prompt the user via auser interface to initiate the communication service 112 to dial thetelephone number 336. Having discussed techniques, approaches,interactions and functions associated with linguistic services and theplatform 106, the script detection service 118 and the languagedetection service 116 will be discussed in-depth.

Referring to FIG. 4, as illustrated, a system 400 includes the scriptdetection service 118 and the language detection service 116 having afrequency module 442. As described with respect to FIGS. 1-3, the scriptdetection service 118 and/or language detection service 116 may beindependent from the application 104 implementing the functionssupported by the language detection service 116.

While the script detection service 118 may be described at times asbeing included in the language detection service, it is to be apparentthat the script detection service 118 may be used independently. In someinstances, for example, the script detection service 118 may be usedindependently to minimize the processing overhead associated withdetecting which human language is associated with a text. For example,the script detection service 118 may be used to indicate what fontchoices are to be offered in a particular editing scenario.

The script detection service 118 is representative of functionality todetermine which human writing system is associated with text charactersin a string of one or more text characters (e.g., a string in questionor the in-question string) based on values representing the textcharacters. With the values, the script detection service 118 maydesignate which human writing system is associated with the stringincluding the text characters. For example, the script detection service118 may determine that the text characters “c-a-t” are Latin textcharacters by scanning the values representing the text characters“c-a-t” 444. The script detection service 118 may use a table thatassociates values with human writing systems in making thedetermination. For example, the table may indicate that when the valuesare within a first subset of values the string is Chinese, while whenthe values are in a second subset of values the string is Thai. Thescript detection service 118 may make this determination (e.g., the textcharacters are Latin) based on the values assigned to the textcharacters “c-a-t”. For example, in the Unicode standard the valuesrepresenting the characters “c-a-t” are within a Latin text charactersubset of values.

While the Unicode standard (e.g., Unicode 5.1) is discussed with respectto the script detection service 118 and/or the language detectionservice 116, other standardized encoding systems are available (e.g.,ASCII and so on) to handle text data in computing-type environments.Unicode is promulgated by the Unicode Consortium which is a non-profitorganization (Unicode, Inc. Mountain View, Calif.).

In the Unicode standard, individual text characters are assignednumerical values that uniquely represent the text character. Forexample, the script detection service 118 may designate that a word in aprocessing document is Chinese by scanning the Unicode valuesrepresenting the text characters in the word.

The script detection service 118 may indicate that a range of positionswithin the text for the one or more text characters included in thestring. For example, the script detection service may form acommunication including the linguistic property information for thestring, e.g., the particular human writing system and the range withinthe text occupied by the text characters included in the string. Therange may be expressed as a starting position for the string and alength of the string, e.g., starting position 43 and 5 bytes long.

In some instances, the script detection service 118 may determine thevalues representing the text characters are unique to a single humanwriting system. For example, when the script detection service 118determines text characters in a string are That (based on the values),the script detection service 118 may designate that the string is Thatand send this linguistic property information to the application 104(e.g., the text characters are That) because no other human writingsystem implements That characters.

In instances in which the values represent text characters that areassociated with more than one human writing system, the script detectionservice 118 may forward this linguistic property information (e.g., thetext characters are Cyrillic) to the frequency module 442. When thevalues representing text characters in the string are Latin textcharacters, the script detection service 118 may indicate thislinguistic property information to the frequency module 442. Thefrequency module 442 may use the linguistic property information (e.g.,the text characters are Latin) to narrow which strings in a targeteddictionary are to be considered when comparing the string in-question tothe targeted dictionary including a plurality of strings.

In other instances, when more than one human writing system isassociated with the string in a text, the script detection service 118may designate a particular human writing system is associated with thestring when a first human writing system is based on another humanwriting system. For example, the script detection service may designatethat a string including Japanese and Chinese characters is Japanesebecause some text characters in Japanese are based on Chinese textcharacters. In additional instances, the script detection service 118may forward the string in-question to the language detection service 116to associate a human language with the designation of the particularhuman writing system.

In one or more embodiments, the script detection service 118 mayindicate that a service is available to perform a function. For example,having designated that a string is Cyrillic, the script detectionservice 118 may indicate that a Russian spelling service is available tocheck to see that the string is spelled properly. As should be apparent,the techniques, approaches, structures and so on employed by the scriptdetection service may be implemented as part of or in conjunction withthe language detection service 116 (discussed further below).

Referring to FIG. 5, as illustrated the language detection service 116includes the frequency module 442 which is representative offunctionality to identify a particular human language associated withthe string (e.g., an in-question string) and/or a text including thestring by comparing the string to a targeted dictionary 546. Forexample, a targeted dictionary 546 may contain a plurality of strings(e.g., words) that are associated with a human language and thatfrequently occur in the human language in comparison to other strings.While words are described, in some instances a string may be acombination of words, such as “Memorial Day.” In another example, astring may be a word along with punctuation, for example, while thestring “the” may appear in a word (e.g., “them”), the word “the” with aspace may be considered. Exemplary human languages may include French,German, Chinese, English, Italian, Spanish, Dutch and so on. Forexample, the frequency module 442 may compare the string with aplurality of strings in the targeted dictionary 546 to identify whichhuman language corresponds with the text and/or string in-question.

In some implementations, what strings in the targeted dictionary areconsidered may be selected based on one or more of the valuesrepresenting the text characters in the string. For example, when thescript detection service 118 determines that the values representLatin-based text characters, the script detection service 118 may informthe frequency module 442 so that strings using Latin text characters inthe targeted dictionary 546 are used for comparison. In this way, thefrequency module 442 may not consider strings in the targeted dictionary546 that are associated with other human writing systems.

Having discussed use of the targeted dictionary 546, sample techniquesare now discussed for populating the targeted dictionary 546 beforediscussing the use of the targeted dictionary 546 in-depth. While theconstruction and use of a targeted dictionary 546 are discussed withrespect to the language detection service 116, it is to be apparent thatthe targeted dictionary 546 may be used in different environments andindependently of the language detection service 116.

The targeted dictionary 546 may be populated with a plurality of stringsthat are individually associated with a human language. Strings may beassociated with a human language, for example, because the stringfrequently occurs in the human language, the string is indicative of thehuman language, the string's role in the human language (e.g., does thestring serve a function in the human language) and so on. In one or moreembodiments, the plurality of strings in the targeted dictionary 546 maybe assigned a weight according to the string's association with thelanguage, e.g., is the string unique to the language. What strings areto be in the targeted dictionary 546 may be decided by analyzing corporaof text, e.g., a significant sampling of text in the human language.

In one or more embodiments, the targeted dictionary 546 may includestrings, such as words, that serve functions in the language, e.g.,determiners, prepositions, conjunctions (connectors) or pronouns.Exemplary determiners include, but are not limited to, “an,” “a,”“some,” “each,” “the,” “der,” “die” and “das” (determiners inEnglish/German). Exemplary prepositions include, but are not limited to,“of, “in,” “on,” “by” and “to.” Exemplary connectors include, but arenot limited to, “and,” ” or, “but” and “if.” Exemplary pronouns include,but are not limited to, “he,” “she,” “it,” “they” and “her.” Theforegoing strings may be used because of the string's role in thelanguage, e.g., a preposition indicates a relationship between items.

In some implementations, how frequently a string appears in the corporaof text may be used to assign a weight to the string in the targeteddictionary 546.

For illustration, sample frequency weights may be (on a 0-10 scale) lessthan one percent (0); one percent (2); one to three percent (4); threeto four percent (6); four to five percent (8); and five percent orgreater (10). The word “she”, for example, made be assigned a greaterweight than another word as the word “she” frequently appears in Englishlanguage text.

When weighing strings in the targeted dictionary 546, a string'sassociation with the human language may be considered as part ofpopulating the targeted dictionary 546. For example, some strings may bein the targeted dictionary 546 even though the string occurs lessfrequently (in comparison to other strings) because the string isindicative of the human language, e.g., linguistically distinct to thehuman language. For example, an indicative string may not appear inother human languages, e.g., related human languages.

When the targeted dictionary 546 contains weighted strings, individualstrings may be assigned a weight based on how indicative the string isof the human language. For example, the word “the” may be given moreweight for the English language in comparison to the word “or” becausethe word “or” appears in both French and English. Exemplary weightingsbased on linguistics may include but are not limited to: (weights areexpressed in the range from minus two through plus two) a string isunique to one human language (+2); a string is included corpora of textfor a second human language but in targeted dictionary for second humanlanguage (+1); a string is in corpora for less than two other humanlanguages (0); a string is in corpora for between two to four otherhuman languages (−1); and a string is in corpora for more than fourother languages (−2).

In some implementations, the plurality of strings in the targeteddictionary may be weighted based on the length of the string, e.g., anumber of text characters in the string. When comparing the strings“the” and “what” the word “what” may be assigned a higher weight as theword “what” includes four text characters, while the word “the” includesthree text characters. Exemplary weightings based on a number of textcharacters in a string may include, but are not limited to, (from minusone to add two) one text character (0); two text characters (−1); threetext characters (no change); four text characters (+1); and five or moretext characters (+2).

In one or more embodiments, strings in the targeted dictionary 546 maybe assigned an overall weight based on one or more of whether the stringserves a function in the human language, how frequently the stringoccurs in the human language, the linguistic distinctiveness of thestring and so on.

An overall number of strings in the targeted dictionary 546 may be basedon which human languages are included. For example, a targeteddictionary 546 including a plurality of strings for the English languagemay include more strings than for another human language based on thefrequency and/or linguistic distinctiveness of the included strings. Theoverall number of strings in the targeted dictionary 546 may be selectedbased on other considerations, such as an expected processing time,processing overhead and so on associated with comparing a stringin-question to the plurality of strings in the targeted dictionary 546.For example, the targeted dictionary may include approximately 300 orless strings for a human language. While additional strings beyondapproximately 300 or less strings may be included in the targeteddictionary 546, populating the targeted dictionary 546 with 300 or lessstrings may permit accurate language detection while minimizing anoverall amount of time to compare the string in-question to theplurality of strings in the targeted dictionary 546.

When a human language does not have a sufficient amount of text toconduct analysis or when obtaining sample text is impractical, theanalysis of another human language may be used to predict which stringsfrom an under-represented language are to be in the targeted dictionary546. For example, a targeted dictionary 546 for a human language mayinclude function words from the “under represented language” based on ananalysis of another human language, e.g., a related human language. Forexample, rather than analyzing Kyrgyz text (a written language usingmodified Cyrillic and Arabic scripts), the targeted dictionary 546 maybe populated with strings representing function words in Kyrgyz. Havingdescribed populating the target dictionary 546, use of the targeteddictionary 546 is now described.

When using the targeted dictionary 546 with weighted strings, a humanlanguage associated with the text (including one or more in-questionstrings) may be weighed as part of identifying the particular humanlanguage associated with the in-question string or the text includingthe in-question string. Consider, for example, the in-questions stringsin the text (e.g., sentence) “What does “le roi des autres poisons”mean?” When comparing the in-question strings forming the text, thefrequency module 442 may identify the particular human language byscoring the weighted values for the strings in the text. For example,the frequency module 442 may identify the text “What does “le roi desautres poisons” mean?” as English by summing the weighted values for thestrings in the sentence. Thus, if the strings are assigned the followingvalues: What (5) does (2) le (4) des (2) the sentence is identified asEnglish even though the text includes the French words “le roi desautres poisons.”

When identifying the particular language, the frequency module 442 maybe configured to check the first text character in the stringin-question and lookup whether the targeted dictionary 546 includes astring that begins with the first text character. For example, when thescript detection service 118 forwards “this is Latin” to the frequencymodule 442, the targeted dictionary 546 may be selected to include anEnglish table including a plurality of strings for English, a Germantable including a plurality of strings for German and so on.

When the first text character in the string is not in the targeteddictionary 546 (e.g., in the English or German tables), the frequencymodule 442 may ignore the string and consider a second string whenidentifying which human language is associated with the text. When thefirst character in the in-question string is in both the English andGerman tables, a second text character may be considered and so on. Whenthe string in question is “apple”, the first three characters may beconsidered (when the English word “apple” is in the English table andthe word “apfel” or another word starting with the text characters “ap”is in the German table. After eliminating German as a potential humanlanguage, the frequency module 442 may confirm the string is “apple” andthe English language is identified. As a result, the frequency module442 may follow a binary tree approach when comparing the in-questionstring to the plurality of strings in the targeted dictionary.

In some embodiments, when text and/or string in question are associatedwith more than one language, the language detection service 116 maycommunicate an ordered list of the human languages to the application104. For instance, in the “What does “le roi des autres poisons” mean?”example the linguistic property information may be (1) English and (2)French.

In one or more embodiments, the language detection service 116 includesa morphology module 548. The morphology module 548 is representative offunctionality to ascertain the human language associated with the stringbased on a substring. Some strings include substrings (e.g., suffixes orprefixes) that are indicative of a human language. For example, thesuffix “-ing” (e.g., a gerund form of a word) may be associated with theEnglish language. The morphology module 548 may ascertain the humanlanguage associated with the string even though the whole string is notin the targeted dictionary 546. While, for example, the frequency module442 may not identify the string “playing” because the string “playing”is not in the targeted dictionary 546, the morphology module 548 mayascertain the string “playing” is associated with the English languagebased on the suffix “-ing” which is parsed from “playing”.

In some implementations, the language detection service 116 includes apunctuation module 550. The punctuation module 550 is representative offunctionality to identify which human language is associated with thestring in-question and/or the text by examining punctuation in the text.For example, in the sentence “What does “le roi des autres poisons”mean?” the punctuation module 550 may associate the text and/orin-questions strings with the English language by examining one or moreof, blank spaces (e.g., no text character) capitalized text characters,punctuation marks and so on.

In additional implementations, the frequency module 442, the morphologymodule 548 and/or the punctuation module 550 may be used in a serialconfiguration, in parallel configuration and so on. In otherembodiments, the frequency module 442 may be used, while the morphologymodule 548 and the punctuation module 550 may be used if one or more ofthe text or the string is of a certain size or if the frequency module442 returns a “tie”, e.g., two human languages are identified.

The components, service, modules, functions and techniques discussedabove may be implemented singly or in combination based on designpreference. Generally, any of the modules, services and functionsdescribed herein can be implemented using software, firmware, hardware(e.g., fixed logic circuitry), manual processing or a combination ofthese implementations. The terms “module,” “functionality,” and “logic”as used herein generally represent software, firmware, hardware or acombination thereof. Additionally, functions can be embodied asexecutable instructions that are included in one or morecomputer-readable storage media.

Example Procedures

The following discussion describes transformation procedures that may beimplemented utilizing the previously described structures, modules,approaches and techniques. Aspects of the procedures may be implementedin hardware, firmware, software or a combination thereof. The proceduresare shown as a set of blocks that specify operations performed by one ormore devices and are not necessarily limited to the orders shown forperforming the operations by the respective blocks.

FIG. 6 depicts a procedure 600 in an example implementation in which anapplication and one or more linguistic services communicate through aplatform. For example, the procedure may be performed by the computer102 including the application 104 and the platform 106 discussed withregard to FIGS. 1-4.

An API call requesting one or more linguistic services, based on aproperty of the linguistic services, is issued (block 602). In one ormore embodiments, the API call specifies which service properties theapplication 104 wants to use. In other instances, the API call may be ageneral request to interact with the linguistic services availablethrough the platform 106.

Responsive to the API call, the linguistic services that are availableare designated (block 604). For example, the platform 106 may designatethe linguistic services 108 that have a service property specified inthe API call (e.g., a spelling property) are available to recognizelinguistic property information associated with text data. Thedesignation of the linguistic service 108 based on one or more serviceproperties may obscure the linguistic services 108 from the application104 (and vice versa). In the foregoing manner, the application 104 maynot be specifically configured for the linguistic service 108. Forexample, instead of designating the proofing service 110, the platform106 may designate the proofing service 110 based on a spelling propertyand a grammar property. In addition, this approach may minimize thenumber of different APIs used by the application in comparison toissuing API calls for a linguistic service.

In some embodiments, the platform may obtain the property of thelinguistic service from the linguistic service in response to receivingthe API call (block 606). In other embodiments, the platform 106 mayhave the property of the linguistic service 108 as the linguisticservice may be a plugin to the platform 106.

In one or more embodiments, the API call may indicate that thelinguistic service 108 is to output linguistic property information in aparticular format. For example, the application 104 may request thatlinguistic property information is to be output in HTML format.

Once a session is initiated, the text including text data may becommunicated through the platform (block 608). For example, the platformmay broker communication of text (e.g., the email message) (block 610)passing through the platform. The platform 106 may, for example, directcommunications between the application 104 and/or linguistic services108. In some embodiments, the platform 106 may broker communicationsbetween linguistic services performing functions for the application104. For example, the grammar service 122 and the language detectionservice 116 may communicate through the platform 106.

Linguistic property information associated with text data in a text isrecognized (block 612). For example, the communication service 112 mayrecognize linguistic property information associated with text datawithin a range of text communicated from the application 104 through theplatform 106.

Upon recognizing linguistic property information associated with textdata, the linguistic property information may be communicated to theapplication (block 614). For example, the linguistic service 108 maypopulate the memory 126 with the linguistic property informationassociated with text data. The text data information may be stored inthe memory 126 until the platform communicates (block 608) thelinguistic property information to the application.

In one or more embodiments, a callback may be formed (block 616) forcommunication to the application (block 608). For example, when theapplication 104 is configured for a-synchronic communication, thelinguistic service 108 may form the callback to inform the application104 that recognition is complete.

In some embodiments, when an action is associated with the text data,the recognized linguistic property information may include an indication(e.g., an actionID) that the linguistic service may perform the action(block 618). For example, if an email address is recognized in a wordprocessing document the communication service 112 may indicate that thelinguistic service 108 can send an email message to the email address.

With the linguistic property information (block 620), the applicationmay initiate the action (block 622) for performance by the service(block 624). In the previous word processing document example, theapplication may display a user interface that permits initiation of theaction, e.g. create an email message targeting the email address.

FIG. 7 depicts a procedure in an example implementation in which scriptdetection may be used to designate a particular human writing systemassociated with a string (e.g., an in-question string) in a text.

A determination is made as which human writing system is associated withindividual text characters in a string of one or more characters (block702). For example, the determination may be made by scanning valuesrepresenting the individual characters to check the values against atable that associates subsets of values with individual human writingsystems. For example, while Latin text characters are within a firstsubset of values, Chinese text characters may be within a second subsetof values. Thus, when scanning the string “c-a-t” against the table, thedetermination may yield human writing systems using Latin textcharacters.

A designation as to which particular human writing system is associatedwith the string may be based on the human writing systems associatedwith the individual text characters in the string (block 704). When thetext characters in the string are associated with, for example, Koreanthe string may be designated as Korean. In the case of a stringincluding Korean text characters, the determination may be definitive asno other human writing system uses Korean text characters.

When the string includes text characters that are associated with a baselanguage and text characters that are associated with a language thatincorporates text characters from the base language (e.g., a childlanguage), the child language may be identified. When a string includesboth Chinese text characters and Japanese text characters, in someinstances, the string may be designated as Japanese. In other examples,language detection techniques may be used to break the “tie.”

In one or more embodiments, an indication may be made as to which rangeof positions within the text are occupied by the text characters (block706) and a communication may be formed that associates the range ofpositions with the particular human writing system (block 708). Forexample, the communication may include the linguistic property “this isChinese text” along with the range of positions occupied by the Chinesetext characters in the string.

In some instances, this communication may be returned to the application104 via the platform and/or may be forwarded to a service, e.g., thelanguage detection service 116.

In some instances, the method 700 may include indicating theavailability of a service to perform a function associated with thecharacters in the string based on the particular language (block 710).Thus, when the string is designated as Thai, a Thai spell-checker may beindicated.

FIG. 8 depicts a procedure 800 in an example implementation in which ahuman language is detected for a text and/or one or more strings in thetext. The text may be provided by the application 104 through theplatform 106 as described with respect to FIG. 6. For example, the text“What does “le roi des autres poisons” mean?” may be provided by theapplication 104 for language detection.

As discussed with respect to FIG. 7, a determination may be made as towhich human writing system is associated with text characters in anin-question string based on values representing the text characters(802). As a result, the human writing system associated with the textcharacters in the in-question string may be determined by scanning thevalues representing the text characters. For example, Latin textcharacters are in a first set of values, while Chinese text charactersare in another set of values. The determination of the human writingsystem associated with the text characters may be definitive for somehuman writing systems, e.g., Korean (as no other human writing systemmakes use of Korean text characters). In other instances, the values mayrepresent text characters that are common to more than one language,e.g., Latin text characters are used by German, Spanish, French and soon.

The human writing system associated with the string by the determinationmay be used to select which strings in the targeted dictionary are to beconsidered when comparing the in-question string to a targeteddictionary (804). While the targeted dictionary may include stringsassociated with a multitude of human languages, the in-question stringmay not be compared to some of the strings in the targeted dictionarybecause the strings are associated with human languages that do notmatch the text characters used in the in-question string.

When the values are associated with more than one human writing system,a comparison of the string in-question with the targeted dictionary ispreformed to identify the human language corresponding to the stringin-question and/or the text including the string. For example, thestring may be compared to the targeted dictionary 546 to identify thehuman language that is associated with the text and/or the stringin-question. For example, an individual string in the targeteddictionary 546 may be associated with a single human language. Thecomparison a may be done on a weighted basis, such as by weighing thestring included in the text. The contents of the targeted dictionary 546and populating the targeted dictionary 546 with a plurality of stringsare discussed with respect to FIGS. 4 and 5.

In some implementations, the human language associated with the stringin-question/and or text may be ascertained from a substring in thestring (block 808). For example, the human language associated with thestring is ascertained by parsing a prefix or a suffix in the string. Byascertaining the human language from a substring in the in-questionstring, the human language associated with the string may be discoveredeven though the string was not identified based on the string itself. Infurther instances, this approach may be used to confirm theidentification based on comparing the string to the plurality of stringsin the targeted dictionary 546. By ascertaining which human language isassociated with the string based on the substring, the number of stringsused to identify which human language is associated with the text may bereduced in comparison to not considering a substring in the string. Forexample, this may shorten the length of a sentence that can beidentified.

In additional implementations, an examination is performed to identifywhich human language is associated with the text and/or the in-questionstring from punctuation included in the text (block 810). For example,in the sentence “What does “le roi des autres poisons” mean?” thepunctuation module may associate the text and/or included strings withthe particular language by examining one or more of, blank spaces (e.g.,no text character) capitalized text characters, punctuation marks and soon.

An assignment may be made as to which human language is associated withthe text based on the particular language associated with the stringin-question (block 810). In the “What does “le roi des autres poisons”mean?” example the text (e.g., the sentence) is assigned the Englishlanguage from the comparison of the strings in-question with thetargeted dictionary.

CONCLUSION

Although the subject matter has been described in language specific tostructural features and/or methodological acts, it is to be understoodthat the subject matter defined in the appended claims is notnecessarily limited to the specific features or acts described above.Rather, the specific features and acts described above are disclosed asexample forms of implementing the claims.

1. A method comprising: determining which human writing system isassociated with individual text characters in a string of one or moretext characters based on values representing the individual textcharacters; and designating that a particular said human writing systemis associated with the string based on the values associated with theindividual text characters.
 2. The method of claim 1, further comprisingindicating a range of positions in a text for the one or more textcharacters.
 3. The method of claim 1, further comprising indicating arange of positions in the text for the one or more text characters; andforming a communication that associates the particular said humanwriting system with the range of positions.
 4. The method of claim 1,further comprising indicating a service available to perform a functionwith the one or more text characters based on the particular said humanwriting system.
 5. The method of claim 1, wherein said determinationincludes scanning values representing the one or more text characterswith a table of values associated with the particular said human writingsystem.
 6. The method of claim 1, wherein said determination includesscanning Unicode values representing the one or more text characterswith a table of Unicode values associated with the particular said humanwriting system.
 7. The method of claim 1, wherein the particular saidhuman incorporates text characters from a base said human writingsystem.
 8. A system comprising: a script detection service to designatewhich particular human writing system is associated with a string of oneor more text characters in a text based on a determination as to whichhuman writing system is associated with individual text characters inthe one or more text characters.
 9. The system of claim 8, wherein thescript detection service is independent of an application providing thetext.
 10. The system of claim 8, wherein the script detection service isfurther configured to scan values representing the one or more textcharacters with a table of values associated with the particular humanwriting system to determine which said human writing system isassociated with individual text.
 11. The system of claim 8, wherein thescript detection service is further configured to indicate a range ofpositions in the text for the one or more text characters.
 12. Thesystem of claim 8, wherein the script detection service is furtherconfigured to: indicate a range of positions in the text for the one ormore text characters in the string; and form a communication thatassociates the particular human writing system with the range ofpositions.
 13. The system of claim 8, wherein the script detectionservice is further configured to indicate an availability of anotherservice based on the particular human writing system.
 14. The system ofclaim 8, wherein the particular said human incorporates text charactersfrom a base said human writing system
 15. One or more computer-readablemedia comprising instructions that are executable by a computer to:designate a particular human writing system as being associated with astring of one or more text characters from a scan of values representingtext characters in the string; and indicate a range of positions in atext including the string for the one or more text characters.
 16. Oneor more computer-readable media as described in claim 15, wherein theinstructions are further executable to form a communication thatassociates the particular human writing system with the range ofpositions.
 17. One or more computer-readable media as described in claim15, wherein the instructions are further executable to indicate aservice to perform a function with the one or more text characters basedon the particular said human writing system.
 18. One or morecomputer-readable media as described in claim 15 wherein the values areUnicode values.
 19. One or more computer-readable media as described inclaim 15, wherein the particular said human incorporates text charactersfrom a base said human writing system.
 20. One or more computer-readablemedia as described in claim 15, wherein the range of positions includesa starting position of the range and a length of the range.